home *** CD-ROM | disk | FTP | other *** search
/ 9-Digit Zip Code Directory / 9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO / z4src.zip / COMPRESS.H < prev    next >
C/C++ Source or Header  |  1993-06-21  |  3KB  |  127 lines

  1. #ifndef _COMPRESS_H_
  2. #define _COMPRESS_H_
  3. //----------------------------------------------------------------------------
  4. //                            MODULE DESCRIPTION
  5. //
  6. //  Module:    compress.h
  7. //   Title:    Compress Library
  8. //  Notice:    John M. Weeder
  9. //                 Copyright (c) 1993. All rights reserved.
  10. //             This module contains proprietary information and should be 
  11. //                treated as confidential.
  12. //
  13. //----------------------------------------------------------------------------
  14. //                           MAINTENANCE HISTORY
  15. //
  16. // $Workfile$
  17. // $Revision$
  18. //   $Author$
  19. //     $Date$
  20. //      $Log$    
  21. //
  22. //----------------------------------------------------------------------------
  23. //                             MODULE NARRATIVE
  24. //
  25. //
  26. //    This module is the header file for the various data compression
  27. //    utilities.
  28. //
  29. //    The code in this module should be written entirely in C. 
  30. //    Do not use any C++ constructs.
  31. //
  32. //    This module is portable to:
  33. //        DOS 3.X+
  34. //        MS Windows 3.X+
  35. //        OS/2 2.X+
  36. //        OS/2 2.0 PM
  37. //        SCO UNIX.
  38. //
  39. //    The following compilers are supported:
  40. //        MSC 6.0A
  41. //        MSC/C++ 7.0
  42. //        Borland C++ 3.1 for DOS
  43. //        Borland C++ 1.0 for OS/2 2.X
  44. //        SCO UNIX cc
  45. //
  46. //----------------------------------------------------------------------------
  47. #include <dio.h>
  48.  
  49.  
  50. //----------------------------------------------------------------------------
  51. //    Data types
  52. //----------------------------------------------------------------------------
  53. typedef struct _CP__ARITH                    // Arithmetic encoder frequency table
  54. {                                                    // Last element should have null string
  55.     SIZET cFreq;                                // Frequency
  56.     CHAR szSymbol[4];                            // Up to 3 character symbol && null
  57.     SIZET cLen;
  58. } CP_ARITH;
  59. BASETYPE(CP_ARITH);
  60.  
  61. #define CP_WORD_VERIFY        (0x0001)
  62.  
  63. //----------------------------------------------------------------------------
  64. //    Prototypes
  65. //----------------------------------------------------------------------------
  66. #if COMPILE_CPP
  67. extern "C"
  68.     {
  69. #endif
  70.  
  71. //
  72. //    cparith.c
  73. //
  74. VOID FN_E ArithAdjust(PCP_ARITH, PSZ);
  75. BOOL FN_E ArithDecode(PBYTE, PSIZET, PCHAR);
  76. BOOL FN_E ArithEncode(PBYTE, PSIZET, PSZ);
  77. BOOL FN_E ArithInitialize(PCP_ARITH);
  78.  
  79. //
  80. //    cpascii.c
  81. //
  82. BOOL FN_E AsciiDecode(PBYTE, PSIZET, PCHAR);
  83. BOOL FN_E AsciiEncode(PBYTE, PSIZET, PCSZ);
  84.  
  85.  
  86. //
  87. //    cpnybble.c
  88. //
  89. BOOL FN_E NybbleDecode(PBYTE, PSIZET, PCHAR);
  90. BOOL FN_E NybbleEncode(PBYTE, PSIZET, PCSZ);
  91.  
  92.  
  93. //
  94. //    cprecid.c
  95. //
  96. BOOL FN_E RecIdDecode(PRECID, SIZET, PBYTE, SIZET, PSIZET, PRECID);
  97. BOOL FN_E RecIdEncode(PRECID, SIZET, PBYTE, SIZET, PSIZET, PRECID);
  98.  
  99.  
  100. //
  101. //    cpstring.c
  102. //
  103. #define StringCreate(x,y)        WordCreate(x,y)
  104. BOOL FN_E StringDecode(PVOID, PBYTE, PSIZET, PCHAR);
  105. #define StringDestroy(x)        WordDestroy(x)
  106. BOOL FN_E StringEncode(PVOID, PBYTE, PSIZET, PCSZ);
  107. #define StringReset(x)            WordReset(x)
  108.  
  109.  
  110. //
  111. //    cpword.c
  112. //
  113. PVOID FN_E WordCreate(SIZET, FLAG16);
  114. PCSZ FN_E WordDecode(PVOID, BYTE);
  115. BOOL FN_E WordDestroy(PVOID);
  116. BYTE FN_E WordEncode(PVOID, PCSZ, BOOL);
  117. BOOL FN_E WordReset(PVOID);
  118.  
  119.  
  120. #if COMPILE_CPP
  121.     }
  122. #endif
  123. //----------------------------------------------------------------------------
  124. //------------------------------- End of File --------------------------------
  125. //----------------------------------------------------------------------------
  126. #endif                                            // _COMPRESS_H_
  127.